package model;

public class Person {

	private Coordinate coord;
	private boolean onCall;
	private int timeOn;
	private int btsIndex;
	private int index;
	
	public Person (Coordinate _coord) {
		this.coord = _coord;
		this.onCall = false;
		this.btsIndex = -1;
	}
	
	public Person () {
		this.coord = new Coordinate(-1, -1);
		this.onCall = false;
	}

	public Coordinate getCoord() {
		return coord;
	}

	public void setCoord(Coordinate coord) {
		this.coord = coord;
	}

	public boolean isOnCall() {
		return onCall;
	}

	public void setOnCall(boolean onCall) {
		this.onCall = onCall;
	}

	public int getBtsIndex() {
		return btsIndex;
	}

	public void setBtsIndex(int btsIndex) {
		this.btsIndex = btsIndex;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public int getTimeOn() {
		return timeOn;
	}

	public void setTimeOn(int timeOn) {
		this.timeOn = timeOn;
	}
	
	public boolean decrementTime(){
		
		boolean ret = false;
		if (this.timeOn == 1) {
			this.timeOn--;
			ret = true;
		} else if (this.timeOn > 1){
			this.timeOn--;
		}
		
		return ret;
	}
	
}
